package com.xuelang.pipeline.domain.pipeline.service.imp;

import com.xuelang.pipeline.domain.pipeline.CacheSetting;
import com.xuelang.pipeline.domain.pipeline.repository.CacheSettingRepository;
import com.xuelang.pipeline.domain.pipeline.service.CacheSettingDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * <p>流水线变量配置域服务实现类</p>
 *
 * @author : yixin.lys
 * @date : 2024-06-13 13:58
 **/
@Service
@Slf4j
public class CacheSettingDomainServiceImpl implements CacheSettingDomainService {

    @Autowired
    private CacheSettingRepository repository;

    @Override
    public List<CacheSetting> queryByPipelineCode(String pipelineCode) {
        return repository.queryByPipelineCode(pipelineCode);
    }

    @Override
    public void addBatch(List<CacheSetting> cacheSettingList, String creatorId, Date createTime) {
        repository.addBatch(cacheSettingList, creatorId, createTime);
    }

    @Override
    public void updateBatch(List<CacheSetting> cacheSettingList, String updaterId, Date updateTime) {
        repository.updateBatch(cacheSettingList, updaterId, updateTime);
    }

    @Override
    public void removeByIds(List<Long> idList) {
        repository.removeByIds(idList);
    }

    @Override
    public void removeByCodes(List<String> codeList) {
        repository.removeByCodes(codeList);
    }
}
